﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Exact_Extension
{
    public partial class MsgCOETransfer : DevExpress.XtraEditors.XtraForm
    {
        Common common;
        ISHCMC_StudentCOEAssigned STAssigned;
        ISHCMC_StudentCOEAvailable STAvailable;
        public MsgCOETransfer(ISHCMC_StudentCOEAssigned _STAssigned, ISHCMC_StudentCOEAvailable _STAvailable,Common _common)
        {
            InitializeComponent();
            common = _common;
            STAssigned = _STAssigned;
            STAvailable = _STAvailable;
        }

        private void btnDelete_Click(object sender, EventArgs e)
        {
           
            int i = common.COETransfer(STAssigned, STAvailable,this.txtReason.Text);
         
            if (i > 0)
            {
                this.DialogResult = DialogResult.OK;
               
            }
            else
            {
                this.DialogResult = DialogResult.No;
            }

        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;           
            this.Close();
            
        }
    }
}